﻿<%@ Page Language="C#" Theme="Samples" AutoEventWireup="true" CodeFile="WebForm1.aspx.cs" Inherits="Samples_Prompt_WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Prompt Sample 1</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="sm1" runat="server" />
        <h2>Prompt Triggers from client events</h2>
        <div>
            <p>
                This page demonstrates the ability to trigger the display of a prompt from a client-side event of a ASP.NET control.  Any valid client-side event is supported.
            </p>
        </div>
        <div>   
            <asp:Button ID="submitButton" Text="Show the Prompt" runat="server" /></div>
        <div>
            <asp:DropDownList ID="dropDown1" runat="server">
                <asp:ListItem Text="Item 1" />
                <asp:ListItem Text="Item 2" />
                <asp:ListItem Text="Item 3" />
            </asp:DropDownList>
        </div>
        <div>
            <asp:CheckBox ID="checkBox1" Text="Show the Prompt" runat="server" /></div>
            <div><asp:TextBox ID="textBox1" Text="Show the prompt on focus" runat="server" /></div>
            
        <ae:Prompt ID="prompt1" Title="Prompt Sample 1" Message="I am the Prompt sample."
            ButtonOptions="OK" runat="server">
            <Triggers>
                <ae:ControlPromptTrigger ControlID="submitButton" EventName="click" PreventDefault="true" />
                <ae:ControlPromptTrigger ControlID="dropDown1" EventName="change" />
                <ae:ControlPromptTrigger ControlID="checkBox1" EventName="click" />
                <ae:ControlPromptTrigger ControlID="textBox1" EventName="focus" />
            </Triggers>
        </ae:Prompt>
        
    </div>
    </form>
</body>
</html>
